package com.admin4j.server.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author andanyang
 * @since 2023-11-14
 */
@Getter
@Setter
@TableName("sys_menu")
@ApiModel(value = "SysMenu对象", description = "菜单权限表")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("菜单ID")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @ApiModelProperty("菜单code 唯一标识")
    private String menuCode;
    @ApiModelProperty("菜单名称")
    private String title;

    @ApiModelProperty("父菜单ID")
    private Long parentId;

    @ApiModelProperty("菜单图标")
    private String icon;

    @ApiModelProperty("显示顺序")
    private Integer sort;

    @ApiModelProperty("路由地址")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    // @ApiModelProperty("路由参数")
    // private String query;

    @ApiModelProperty("是否为外链（1是 0否）")
    private Boolean isFrame;

    @ApiModelProperty("是否缓存（1缓存0不缓存）")
    private Boolean isCache;

    @ApiModelProperty("菜单类型（1目录 2菜单 3按钮）")
    private Integer menuType;

    @ApiModelProperty("菜单状态（1显示 0隐藏）")
    private Boolean visible;

    @ApiModelProperty("菜单状态（0正常 1停用）")
    private Boolean status;

    @ApiModelProperty("创建者")
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("备注")
    private String remark;
}
